package com.example.multiple.service.slave.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.example.multiple.annotation.DataSource;
import com.example.multiple.domain.master.User;
import com.example.multiple.domain.slave.Product;
import com.example.multiple.enums.DataSourceType;
import com.example.multiple.mapper.slave.ProductMapper;
import com.example.multiple.service.slave.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@DataSource(DataSourceType.SLAVE)
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {

    @Resource
    private ProductMapper productMapper;

    @Override
    public Product selectProductByName(String name) {
        return productMapper.selectProductByName(name);
    }
}
